//
//  HUDManager.m
//  UI_AFN二次封装
//
//  Created by 守护神 on 15/8/31.
//  Copyright (c) 2015年 守护神. All rights reserved.
//

#import "HUDManager.h"

static MBProgressHUD *progressHUD;

@implementation HUDManager


+ (void)showStatusWithString:(NSString *)string
{
    // 获取当前window对象
    UIWindow *window = [[UIApplication sharedApplication] keyWindow];
    // 显示在当前的window上
    progressHUD = [MBProgressHUD showHUDAddedTo:window animated:YES];
    // 显示标题
    progressHUD.labelText = string;
    
    // HUD类型
    progressHUD.mode = MBProgressHUDModeIndeterminate;
    // 背景
    progressHUD.dimBackground = NO;
    
    // 用户交互关闭 才能在其他页面进行操作
    progressHUD.userInteractionEnabled = NO;
    
    
    
}


+ (void)closeHUD
{
    [progressHUD hide:YES];
}


@end
